﻿using System;
using System.Collections.Generic;
using XbsWebAPI.EntityFrameworkCore.Entities.SystemAdmin;

namespace XbsWebAPI.Application.SystemAdmin.Dtos
{
    public class MenuTreeDto
    {
        public MenuTreeDto()
        {
            //ButtonMenus = new List<ButtonMenuTreeDto>();
            ChilrenMenus = new List<ChildMenuTreeDto>();
        }
        public Guid Id { get; set; }   

        public string Name { get; set; }


        public int Sort { get; set; }

        public string Icon { get; set; }

        public string Path { get; set; }


        public MenuType MenuType { get; set; }

        public List<ChildMenuTreeDto> ChilrenMenus { get; set; }
    }

    public class ChildMenuTreeDto
    {
        public ChildMenuTreeDto()
        {
            ButtonMenus = new List<ButtonMenuTreeDto>();
        }

        public Guid Id { get; set; }

        public string Name { get; set; }

        /// <summary>
        /// 菜单父级名称
        /// </summary>
        public string PName { get; set; }

        /// <summary>
        /// 菜单父级Id
        /// </summary>
        public Guid? PId { get; set; }


        public int Sort { get; set; }

        public string Icon { get; set; }

        public string Path { get; set; }

        public MenuType MenuType { get; set; }

        public List<ButtonMenuTreeDto> ButtonMenus { get; set; }
    }

    public class ButtonMenuTreeDto
    {
        public Guid Id { get; set; }

        public Guid? PId { get; set; }

        public string PName { get; set; }

        public MenuType MenuType { get; set; }

        public string Identifying { get; set; }
    }
}
